<template>
    <p>firstName:{{userStore.firstName}}</p>
    <p>lastName:{{userStore.lastName}}</p>
    <p>fullName:{{userStore.fullName}}</p>
    <button @click="userStore.changeFirstName">changeFirstName</button>
    <button @click="userStore.changeLastName">changeLastName</button>
</template>
<script setup>
import {useUserStore} from '../stores/userStore';
const userStore = useUserStore();
/* userStore.$subscribe((mutation, state)=>{
  localStorage.setItem('user',JSON.stringify(state));
}) */

</script>